<!doctype html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1">
<title>Layer</title>
<link rel="stylesheet/less" type="text/css" href="../src/less/index.less" />
<script src="js/less.min.js" type="text/javascript"></script>

<script src="../lib/zepto.min.js"></script>
<script src="../src/js/init.js"></script>
<script src="../dist/js/kui.js"></script>
<style>
table td:nth-child(3){word-wrap:break-word; word-break: break-all;}
</style>
</head>

<body>
<div class="kui-page">
	<div class="kui-header">
		<div class="pull-left icon-left app-back" onClick="history.back()">返回</div>
		<h1 class="kui-title">kui js</h1>
	</div>
	<div class="kui-content">
		<div class="kui-block-title">小工具</div>
		<div class="kui-blocker">
			<table class="kui-table kui-table-active Mb" width="100%" border="0" cellspacing="0" cellpadding="5">
				<tr>
					<th>属性</th>
					<th>说明</th>
				</tr>
				<tr>
					<td>kui.version</td>
					<td>当前UI版本</td>
				</tr>
				<tr>
					<td>kui.ua</td>
					<td>UserAgent</td>
				</tr>
				<tr>
					<td>kui.device</td>
					<td>设备信息，{os:'系统名',name:'设置名',version:'系统版本'}</td>
				</tr>
				<tr>
					<td>kui.iswx</td>
					<td>是否微信</td>
				</tr>
				<tr>
					<td></td>
					<td></td>
				</tr>
			</table>
		</div>
		<div class="kui-block-title">小工具</div>
		<div class="kui-blocker">
			<ul class="kui-list">
				<li class="kui-list-item">
					<div class="kui-list-info">
						<div>kui.Get('name') 获取地址栏参数</div>
						<p>kui.Get('#name')可获取hash参数</p>
					</div>
				</li>
			</ul>
		</div>
		<div class="kui-block-title">数据缓存</div>
		<div class="kui-blocker">
			<small class="kui-text-node Pd">本缓存功能是通过重新封装localStorage实现，实现可以直接存取<strong>JSON</strong>、<strong>Array</strong>数据以及设置过期时间。</small>
			<p class="kui-tips-primary Pd">kui.cache(name,value,time)</p>
			<table class="kui-table kui-table-active Mb" width="100%" border="0" cellspacing="0" cellpadding="5">
				<tr>
					<th>参数</th>
					<th>类型</th>
					<th>说明</th>
				</tr>
				<tr>
					<td>name</td>
					<td>string</td>
					<td>必填</td>
				</tr>
				<tr>
					<td>title</td>
					<td>str/json/arr</td>
					<td>内容，为空则输出名称所对应的缓存值。</td>
				</tr>
				<tr>
					<td>time</td>
					<td>Number</td>
					<td>有效期（小时），默认6小时</td>
				</tr>
			</table>
			<p class="kui-tips-primary Pd">kui.removeCache(name) 获取指定缓存</p>
			<div class="Plr">删除缓存，如name为空，则清除所有用kui.cache写入的缓存</div>
		</div>
		<div class="kui-block-title">Cooke操作</div>
		<ul class="kui-list kui-1px-tb Mlr">
			<li class="kui-list-item">
				<div class="kui-list-info">
					<div>kui.addCookie(name, value, day, path)</div>
					<p>day:缓存天数，默认30天</p>
					<p>path:路径，默认针对跟目录</p>
				</div>
			</li>
			<li class="kui-list-item">
				kui.getCookie(name) 读取Cookie
			</li>
			<li class="kui-list-item">
				kui.delCookie(name) 删除Cookie
			</li>
		</ul>
	</div>
</div>
<script>
//kui.cache('abc',654654);
console.log(kui.ua)
console.log(kui.iswx)
</script>
</body>
</html>
